package com.stars.easyms.logger.support.log4j12.redefine;

import com.stars.easyms.logger.support.log4j12.EasyMsLog4j12LoggerContext;
import org.slf4j.ILoggerFactory;
import org.slf4j.spi.LoggerFactoryBinder;

/**
 * <p>className: EasyMsStaticLoggerBinder</p>
 * <p>description: StaticLoggerBinder重写</p>
 *
 * @author guoguifang
 * @date 2019-08-15 23:25
 * @since 1.3.0
 */
public class EasyMsStaticLoggerBinder implements LoggerFactoryBinder {

    private static final EasyMsStaticLoggerBinder SINGLETON = new EasyMsStaticLoggerBinder();

    public static final EasyMsStaticLoggerBinder getSingleton() {
        return SINGLETON;
    }

    public static String REQUESTED_API_VERSION = "1.6.99";

    private static final String loggerFactoryClassStr = EasyMsLog4j12LoggerContext.class.getName();

    private final ILoggerFactory loggerFactory;

    private EasyMsStaticLoggerBinder() {
        loggerFactory = EasyMsLog4j12LoggerContext.getSingleton();
    }

    @Override
    public ILoggerFactory getLoggerFactory() {
        return EasyMsLog4j12LoggerContext.getSingleton();
    }

    @Override
    public String getLoggerFactoryClassStr() {
        return EasyMsLog4j12LoggerContext.class.getName();
    }
}
